<script setup lang="ts">
const props = defineProps({
  modelValue: {
    type: Number,
    default: 10,
  },
})

const emit = defineEmits<{
  (e: 'update:modelValue', value: number): void
}>()

const pay = () => {
  emit('update:modelValue', props.modelValue - 1)
}
</script>

<template>
  demo - {{ modelValue }}
  <button @click="pay">pay</button>
</template>

<style scoped></style>
